UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '074/x/fGbx5zBbPyvwrGmo3DTWS10s8vzKA/79xrH3I='
WHERE
key_id = '6f7d5227ed294e137b43170fbbed23bed54b3a4f5548e1ceb70b96f5025810b9'
AND (
token = '074/x/fGbx5zBbPyvwrGmo3DTWS10s8vzKA/79xrH3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)