UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u1mQ1zkTM7r1kBiRYUVziZAUVEgyp24KFHKt7uO4Gsg='
WHERE
key_id = '468921b3e2eeb03ef6e7de35490498fccf473f5721a36010f98ffbabfcf29d64'
AND (
token = 'u1mQ1zkTM7r1kBiRYUVziZAUVEgyp24KFHKt7uO4Gsg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)