UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vN+fLPjldk7DlksF2UfwaCRsADKoUh0bgDyo8zd11/g='
WHERE
key_id = '289e226240bc3cc104e672aa16127fcaf56f842d7027b1978930616085a0c224'
AND (
token = 'vN+fLPjldk7DlksF2UfwaCRsADKoUh0bgDyo8zd11/g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)