UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pUHksTmgVm9NieqU+0pLAFO2e5FDBufvhWZ/cFhEq2M='
WHERE
key_id = '53549be0e4f68c1a0e23a9626a6a52ff7b5f9fcef52c533c820e6adcfa6e4763'
AND (
token = 'pUHksTmgVm9NieqU+0pLAFO2e5FDBufvhWZ/cFhEq2M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)