UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qJ0CX5Ml/b4A7dVSWMT413hjU0f0auq+Kd8aONH7bdo=' 
WHERE 
  key_id = '0fdfb58b44458372417689ac7ec7fa458ce98648925864d8fd4e889fb297cc7c' 
  AND (
    token = 'qJ0CX5Ml/b4A7dVSWMT413hjU0f0auq+Kd8aONH7bdo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034