UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Gb0ANk0UZSSftbNgpKkES3arvyxxEcdoZ759Psf060='
WHERE
key_id = '0205522586dc39f1159bc9695248796baf8ec310439eaf07c39ba7b29ddf6b70'
AND (
token = '1Gb0ANk0UZSSftbNgpKkES3arvyxxEcdoZ759Psf060='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)