UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GzTCsoIPB17ne50w4fQi3Ug2wRNT7jxyooN1K/0PnRQ='
WHERE
key_id = '5df0adcee8acf07140a5b16aaebef6823fcf925b20d033bc727993acbdb6526a'
AND (
token = 'GzTCsoIPB17ne50w4fQi3Ug2wRNT7jxyooN1K/0PnRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)