UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LIN4yyNm2+Jtz5Sp5q2jm2aIpoZ3ex31FEz2eTGQ6eA='
WHERE
key_id = 'd6edf94473416170d539ea909902a8da68f6fad0d0d8109892505c4ec5ffd0ae'
AND (
token = 'LIN4yyNm2+Jtz5Sp5q2jm2aIpoZ3ex31FEz2eTGQ6eA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)