UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8X6SvSq3wkzwLlrSzEWAY9F1ZMF4k6XKa/JiJCHQX5Q='
WHERE
key_id = '8a282f5d4d02f1d85fccac6fbaaa16e515ab8aafe457afbf4c5bac12fe04ed7f'
AND (
token = '8X6SvSq3wkzwLlrSzEWAY9F1ZMF4k6XKa/JiJCHQX5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)