UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Inj2SQi+mRlYoFOa4p50Pgy8YJPTUoAx+KbOJ35jHcM='
WHERE
key_id = '63f48ec266ae5a88315750c57414b2a6698d02b176fb8057d45a3a0b29dd4fd1'
AND (
token = 'Inj2SQi+mRlYoFOa4p50Pgy8YJPTUoAx+KbOJ35jHcM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)