UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cp3GlJiuvhwNVGWin+LR5tQxa5638xCz/t6Pppb2Prk='
WHERE
key_id = 'ed9d2e6b4ae8bc3c8faef45ba5c70caa0b07c685c1b70ee645e767c8905699fb'
AND (
token = 'Cp3GlJiuvhwNVGWin+LR5tQxa5638xCz/t6Pppb2Prk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)