UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+jwTka/pvS3X+SX9qJXbLc/9IpclKdpUxtJ+AoD0pQc='
WHERE
key_id = '5b8ee025db140aa1b6beedc5367daecea366e582a1bfa821b54b8652564ef3aa'
AND (
token = '+jwTka/pvS3X+SX9qJXbLc/9IpclKdpUxtJ+AoD0pQc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)