UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9PiUYZhe/LzsLW37kdWJbZFGoXubLR/B4DTRMdVvLFc='
WHERE
key_id = '13062c12590b2de088ba649a07081a36a340e49c9563abc121b4124fbaab6968'
AND (
token = '9PiUYZhe/LzsLW37kdWJbZFGoXubLR/B4DTRMdVvLFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)