UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/D/wlwhi4XKW7LZPy4fAvQIoKmGJvjGFwUv9bbaJVJE=' 
WHERE 
  key_id = 'f2771f4ff26788e0b5fae3de87c143b39f1cd21ff11a0593eb6d091151dd69a0' 
  AND (
    token = '/D/wlwhi4XKW7LZPy4fAvQIoKmGJvjGFwUv9bbaJVJE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037