UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fv91Q76zhz8rrdev1uZNGHZfBTj34Cr5G5+eiP/Q8WA='
WHERE
key_id = '25978918c4edb397c3f6d870597c0344e060b0ea961bf554a0a262647e25df6e'
AND (
token = 'Fv91Q76zhz8rrdev1uZNGHZfBTj34Cr5G5+eiP/Q8WA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)