UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cOwYv5iZzzojC9rSgC2llX+7Lt1WB0fQatNTaplL7hA='
WHERE
key_id = '0a4d632578accdb6185e1b4c52ec6ed901c08d699b9a529c2df23561f9e4be73'
AND (
token = 'cOwYv5iZzzojC9rSgC2llX+7Lt1WB0fQatNTaplL7hA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)