UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wDGl2fODV4aUmg0OGE3ITleww1Dp/S/D+ZJ0tKGqDWQ='
WHERE
key_id = '1708693918166783dbdcb969e3bb70eda3cd54f80c39968cb5ba6699d4a8ed42'
AND (
token = 'wDGl2fODV4aUmg0OGE3ITleww1Dp/S/D+ZJ0tKGqDWQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)