UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Jv/cy6c8Cc71CZGLQ9b7qZbO6JhkF5VT31N8jEFLhVA=' 
WHERE 
  key_id = '0e909e6683b2b70d3f63b2bc00e8a7b9541a895076b04a98d7d4229a51fddf35' 
  AND (
    token = 'Jv/cy6c8Cc71CZGLQ9b7qZbO6JhkF5VT31N8jEFLhVA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044