UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WCBquuEOo7xa0s9a3fM979LwCQrIBFgVlNZLUd7DHFw='
WHERE
key_id = 'f639ccc8327d131ec9add6e924980e355685175306cd2a9b7aa6e1565724fb0b'
AND (
token = 'WCBquuEOo7xa0s9a3fM979LwCQrIBFgVlNZLUd7DHFw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)