UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/UtFILsYxmwdm/T3GIseAe/meG1GsfwT7dQmyT+DMKw='
WHERE
key_id = '3507f5da881bcda0828b143198a050bf6832c8e4957e4d67ce35fb9ad40cdeb5'
AND (
token = '/UtFILsYxmwdm/T3GIseAe/meG1GsfwT7dQmyT+DMKw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)