UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'O+0czj87CtxFr6rtTVPgfVdsEmdElSdetGnxCowPQmg='
WHERE
key_id = '609bd0dc17140e59efc3164fe116e62884bbaf86c1a900a39942952b699682e3'
AND (
token = 'O+0czj87CtxFr6rtTVPgfVdsEmdElSdetGnxCowPQmg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)