UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8U4wpX/j/lM1/skxgyLDCy+c3AxH4XByW3FSHywA1JM='
WHERE
key_id = '7bcf8934ed6e9aa311ce0b633c52cd76c74d8d7381263eaa6c8b5bc976f80a58'
AND (
token = '8U4wpX/j/lM1/skxgyLDCy+c3AxH4XByW3FSHywA1JM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)