UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vWj4PLZX2+o+JbZJNyMQMxfJ+p9vVb0XefaWuVDXmjg='
WHERE
key_id = '554e148c00bb6f0231fbbf8898019aa62751a05792b911616abaeace2b379cbb'
AND (
token = 'vWj4PLZX2+o+JbZJNyMQMxfJ+p9vVb0XefaWuVDXmjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)