UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nWJGTsv/ksyzve9H0KK0c5rGsK09kDZNljGv3e0ny7M='
WHERE
key_id = '71c59853b7ff2c98887d1c9d16a3d4fc7b00c3eb95dd90e5116213cbbcdc9f43'
AND (
token = 'nWJGTsv/ksyzve9H0KK0c5rGsK09kDZNljGv3e0ny7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)