UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'S7w3SVrI5T2nlVgHWJA8GVUSafXFLrxpKwXDorEYUZA='
WHERE
key_id = '93526a2f29026d1891a24828ae4e7c09e0c2916d4d3cd44952d65ad6a9cbcf49'
AND (
token = 'S7w3SVrI5T2nlVgHWJA8GVUSafXFLrxpKwXDorEYUZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)