UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1UuQmJH+qR4bbXRC6bnBwpLPY85luxcctVX7U9+hNiI='
WHERE
key_id = '43caf0826014076f0c02cdf934d8f0f06335ef62ddeaca3f873b48300d8ef1e4'
AND (
token = '1UuQmJH+qR4bbXRC6bnBwpLPY85luxcctVX7U9+hNiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)