UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5FQD/d8turIKl1akbwXXodrRClnUI3p/YvNVOYwV4/Y='
WHERE
key_id = 'e43f887c37655fe6441bb8354ec71121826575d97023db50c842221bb1f24d82'
AND (
token = '5FQD/d8turIKl1akbwXXodrRClnUI3p/YvNVOYwV4/Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)