UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fjl2yxBFujW1QMrNuXNZKvtUDZIXO2a/3oziUyE8qb4='
WHERE
key_id = '4be28a7d9bde303e39c8dd475d8135352f7a78bb02610c701867549c6a6c4654'
AND (
token = 'Fjl2yxBFujW1QMrNuXNZKvtUDZIXO2a/3oziUyE8qb4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)