UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vchbfWAKIUVPhC7gs5Kzpnq4AktBs3g6lR9g+KaJTHc='
WHERE
key_id = 'abc43a0a0b540c1bed5beb1efad479fad3194c31dedbdd85c79e246c5e127fde'
AND (
token = 'vchbfWAKIUVPhC7gs5Kzpnq4AktBs3g6lR9g+KaJTHc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)