UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wmy2Wsx3B34UgRgvpX3GUj71K09KKLR4pz1oj2l0bq0='
WHERE
key_id = '72200a834ee6550be2c815df2e5c4ebd124f600af265adcf8c45e5ba15c02f83'
AND (
token = 'Wmy2Wsx3B34UgRgvpX3GUj71K09KKLR4pz1oj2l0bq0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)