UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LB2hUZuNTn8c/L5Cn2qsq1AnHGk4L6/XrS8Qy78V5ZA='
WHERE
key_id = '590e03f9b445ae833f0e475a60235e8ad70d2c4bb0bc35d8cfa251a4d81d6023'
AND (
token = 'LB2hUZuNTn8c/L5Cn2qsq1AnHGk4L6/XrS8Qy78V5ZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)