UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GazoEQRazD4CNibZbh6fh0MVWKtu+yClrqzAYDv5Pqg='
WHERE
key_id = '6434ae047ca79fab145de4349790c0d0f7cabefa00657ca7757557aec39574d1'
AND (
token = 'GazoEQRazD4CNibZbh6fh0MVWKtu+yClrqzAYDv5Pqg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)