UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'meUIJ5l7L3739p53xH1i9LQht3nPCxUE/ZVyZo296hg='
WHERE
key_id = 'd25a94ecae97d83c03885eb16510d0b9359f47d1ba8d3462a429a9640f83cff3'
AND (
token = 'meUIJ5l7L3739p53xH1i9LQht3nPCxUE/ZVyZo296hg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)