UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7eqmOqDPeUukOgoDCSZqiol3g87RE/M/qmtn7OBC/PE='
WHERE
key_id = 'c67a95ccbdd60f0b6539435375b8655f2419bdc937e62c8086e64cdfb7d13a9c'
AND (
token = '7eqmOqDPeUukOgoDCSZqiol3g87RE/M/qmtn7OBC/PE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)