UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '627X2xIIbKiYKEd6VAuXCXPbFpmilB6uqL/B1Nwp/hg=' 
WHERE 
  key_id = '3054ac90f0429d586226fc5dc45a98e647fbf18bdabb9d9ae2da1611ab3852cc' 
  AND (
    token = '627X2xIIbKiYKEd6VAuXCXPbFpmilB6uqL/B1Nwp/hg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041