UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WvJM7TMbHu/IKZXetcPqs+V8Fpu2lDFy22qYJCZ0fhw='
WHERE
key_id = '974b666e1baf9c2704119386a0ea60a66f13795cf48ed136d2e53ef732749120'
AND (
token = 'WvJM7TMbHu/IKZXetcPqs+V8Fpu2lDFy22qYJCZ0fhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)